Method And Device For Obtaining Internal Side, External Side Insulation Resistances Of Relay, And Battery Management System

ABSTRACT

Provided is a method and device for obtaining internal side and external side insulation resistances of a relay. The method comprises steps of: controlling the insulation resistance obtaining circuit to output a low-frequency AC signal; when both the main relay and the pre-charge relay are switched off, obtaining an internal side insulation resistance of the main relay according to the low-frequency AC signal; if the internal side insulation resistance of the main relay is normal, controlling the pre-charge relay to be switched on; and when the main relay is switched off and the pre-charge relay is switched on, obtaining an external side insulation resistance value of the main relay according to the low-frequency AC signal. Therefore, the present disclosure can obtain the internal side and external side insulation conditions of the main relay.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims priority to Chinese Patent ApplicationNo. 201810103562.7, filed on Feb. 1, 2018, the content of which isincorporated herein by reference in its entirety

TECHNICAL FIELD

The present application relates to the field of insulation technologyand, particularly, relates to a method, a device for obtaining internalside and external side insulation resistances of a relay, and a batterymanagement system.

BACKGROUND

It is a trend in the development of automobile industry that theelectric vehicles replace the oil-fueled vehicles. The endurancemileage, service life, safety and the like of power batteries areparticularly important to the use of electric vehicles. Insulationperformance, as one of the indexes for evaluating the safetyperformance, is an indispensable test item in the power batteries.

A main relay includes a main positive relay and a main negative relay,wherein the main positive relay is a relay connected in a main circuitof a positive electrode of a battery pack, and the main negative relayis a relay connected in a main circuit of a negative electrode of thebattery pack. A load may be connected between the main positive relayand the main negative relay. The existing methods for obtaining theinsulation resistance values of the main relay generally can only obtainan internal side insulation resistance of the main relay. However, anexternal side insulation resistance of the main relay can be obtainedonly when the main relay is switched on. The internal side insulationresistance is an insulation resistance of the relay at a side of therelay close to the battery pack, while the external side insulationresistance of the relay is an insulation resistance of the relay at aside of the relay away from the battery pack.

In view of the above, when an insulation fault occurs to the side of themain relay away from the battery pack, the insulation situation of themain relay at the side of the main relay away from the battery packcannot be obtained if the main relay is switched off, which may causedangerous contact between the high voltage and the ground. In contrast,if the main relay is directly switched on, the insulation failure at theside of the relay away from the battery pack may also lead to securityincidents.

SUMMARY

In view of the above, embodiments of the present disclosure provide amethod and a device for obtaining an internal side insulation resistanceand an external side insulation resistance of a relay, especially forobtaining an internal side insulation resistance and an external sideinsulation resistance of the main relay, so as to solve the problems inthe prior art that the external side insulation conditions of the mainrelay cannot be obtained when the main relay is switched off as well asthe problem of the accompanying security risk.

In a first aspect, an embodiment of the present disclosure provides amethod for obtaining internal side and external side insulationresistances of a relay. The method is applied to a circuit comprising abattery pack, a main relay and a pre-charge circuit. The main relaycomprises a main positive relay and a main negative relay, thepre-charge circuit comprises a pre-charge relay and a pre-chargeresistor and is connected in parallel to both sides of the main positiverelay, an insulation resistance obtaining circuit is connected betweenthe battery pack and the main positive relay, wherein the methodcomprises steps of: controlling the insulation resistance obtainingcircuit to output a low-frequency AC signal; when both the main relayand the pre-charge relay are switched off, obtaining an internal sideinsulation resistance of the main relay according to the low-frequencyAC signal; if the internal side insulation resistance of the main relayis normal, controlling the pre-charge relay to be switched on; and whenthe main relay is switched off and the pre-charge relay is switched on,obtaining an external side insulation resistance of the main relayaccording to the low-frequency AC signal.

According to a further embodiment, before the step of controlling thepre-charge relay to be switched on, the method further comprises stepsof: detecting whether the internal side insulation resistance of themain relay is normal or not; if it is detected that the internal sideinsulation resistance of the main relay is normal, performing the stepof controlling the pre-charge relay to be switched on and the subsequentsteps; and if it is detected that the internal side insulationresistance of the main relay is abnormal, performing an alarm operation.

According to a further embodiment, the step of detecting whether theinternal side insulation resistance of the main relay is normal or notcomprises: detecting whether the internal side insulation resistance ofthe main relay is greater than a first preset alarm threshold; if theinternal side insulation resistance of the main relay is greater thanthe first preset alarm threshold, determining that the internal sideinsulation resistance of the main relay is normal; and if the internalside insulation resistance of the main relay is smaller than or equal tothe first preset alarm threshold, determining that the internal sideinsulation resistance of the main relay is abnormal.

According to a further embodiment, the method further comprises stepsof: detecting whether the external side insulation resistance of themain relay is normal or not; if it is detected that the external sideinsulation resistance of the main relay is normal, ending the detecting;and if it is detected that the external side insulation resistance ofthe main relay is abnormal, performing an alarm operation.

According to a further embodiment, the step of detecting whether theexternal side insulation resistance of the main relay is normal or notcomprises: detecting whether the external side insulation resistance ofthe main relay is greater than a second preset alarm threshold; if theexternal side insulation resistance of the main relay is greater thanthe second preset alarm threshold, determining that the external sideinsulation resistance of the main relay is normal; and if the externalside insulation resistance of the main relay is smaller than or equal tothe second preset alarm threshold, determining that the external sideinsulation resistance of the main relay is abnormal.

According to a further embodiment, the step of ending the detectingcomprises steps of: controlling the main negative relay to be switchedon, so as to pre-charge a load; when the pre-charging of the load ends,controlling the pre-charge relay to be switched off; and controlling themain positive relay to be switched on.

According to a further embodiment, the insulation resistance obtainingcircuit comprises two sampling points.

According to a further embodiment, the step of obtaining the internalside insulation resistance of the main relay according to thelow-frequency AC signal comprises: when both the main relay and thepre-charge relay are switched off, collecting electrical signals at thetwo sampling points by the insulation resistance obtaining circuit;obtaining a first phase shift of the low-frequency AC signal between thetwo sampling points according to the collected electrical signals andobtaining a change in amplitude of the electrical signals collected atthe two sampling points; and obtaining the internal side insulationresistance of the main relay according to the collected electricalsignals and the first phase shift.

According to a further embodiment, the step of obtaining the externalside insulation resistance of the main relay according to thelow-frequency AC signal comprises: when the main relay is switched offand the pre-charge relay is switched on, collecting electrical signalsat the two sampling points by the insulation resistance obtainingcircuit; obtaining a second phase shift of the low-frequency AC signalbetween the two sampling points according to the collected electricalsignals; and obtaining the external side insulation resistance of themain relay according to the collected electrical signals and the secondphase shift.

According to a further embodiment, the insulation resistance obtainingcircuit comprises: a signal synthesizer having a first terminalgrounded; an isolation capacitor connected between a positive electrodeof the battery pack and the main positive relay; a sampling resistorconnected between a second terminal of the isolation capacitor and asecond terminal of the signal synthesizer; a first sampling componentconnected to a first terminal of the sampling resistor; and a secondsampling component connected to a second terminal of the samplingresistor.

According to a further embodiment, the first sampling componentcomprises: a first filter resistor having a first terminal connected tothe first terminal of the sampling resistor; a first filter capacitorhaving a first terminal connected to a second terminal of the firstfilter resistor and a second terminal grounded; a first voltage followerhaving a first input terminal connected to both the first terminal ofthe first filter capacitor and the second terminal of the first filterresistor, and a second input terminal connected to an output terminal ofthe first voltage follower; and a first analog-to-digital converterconnected to the output terminal of the first voltage follower.

According to a further embodiment, the second sampling componentcomprises: a second filter resistor, having a first terminal connectedto the second terminal of the sampling resistor; a second filtercapacitor having a first terminal connected to a second terminal of thesecond filter resistor, and a second terminal grounded; a second voltagefollower having a first input terminal connected to both the firstterminal of the second filter capacitor and the second terminal of thesecond filter resistor, and a second input terminal connected to anoutput terminal of the second voltage follower; and a secondanalog-to-digital converter connected to the output terminal of thesecond voltage follower.

In a second aspect, an embodiment of the present disclosure provides adevice for obtaining internal side and external side insulationresistances of a relay. The device comprises an insulation resistanceobtaining circuit for outputting an AC signal and collecting anelectrical signal, and a processor, wherein the processor is configuredto: control the insulation resistance obtaining circuit to output alow-frequency AC signal; obtain an internal side insulation resistanceof a main relay according to the low-frequency AC signal when both themain relay and a pre-charge relay are switched off; control thepre-charge relay to be switched on when the internal side insulationresistance of the main relay is normal; and obtain an external sideinsulation resistance of the main relay according to the low-frequencyAC signal when the main relay is switched off and the pre-charge relayis switched on.

In a third aspect, an embodiment of the present disclosure provides abattery management system comprising the device for obtaining internalside and external side insulation resistances of a relay according tothe second aspect.

In a fourth aspect, an embodiment of the present disclosure provides acomputer-readable storage medium, including: computer-executableinstructions. The computer-executable instructions are executed toimplement the method for obtaining the internals side and external sideinsulation resistances of the relay according to any one of theabove-described embodiments

the technical solutions described above have at least the followingbeneficial effects:

In the embodiment of the present disclosure, with respect to the circuitformed by the battery pack, the main relay and the pre-charge circuit, alow-frequency AC signal can be output by the insulation resistanceobtaining circuit connected between the battery pack and the mainpositive relay, so as to obtain the internal side insulation resistanceof the main relay when the main relay and the pre-charging relay areswitched off; and when the internal side insulation resistance of themain relay is determined to be normal, the pre-charge relay iscontrolled to be switched on, and then the low-frequency AC signal isinput into the pre-charge circuit, so as to obtain the external sideinsulation resistance of the pre-charge relay (i.e. equivalent toobtaining of the external side insulation resistance of the main relay)based on the low-frequency AC signal. In this process, the switched-offmain relay excludes the security risk caused by the switch-on of themain relay when an insulation fault occurs to the side of the main relayaway from the battery pack. Therefore, the technical solution providedby the embodiments of the present disclosure can obtain the internalside and external side insulation conditions of the main relay, so as tosolve the problem in the prior art that the insulation condition at theside of the main relay away from the battery pack cannot be obtainedwhen the main relay is switched off while avoiding the accompanyingsecurity risk.

BRIEF DESCRIPTION OF DRAWINGS

In order to clearly elucidate the technical solutions of the embodimentsin the present disclosure, the accompanying drawings will be brieflydescribed below. It should be understood that the drawings describedbelow only illustrate several embodiments of the present disclosure. Onbasis of these drawings, those skilled in the art are able to obtainother possible drawings without paying any inventive efforts.

FIG. 1 is a schematic diagram of a circuit used in a method forobtaining an internal side insulation resistance and an external sideinsulation resistance of a relay according to an embodiment of thepresent disclosure;

FIG. 2 is a schematic flowchart of a method for obtaining an internalside insulation resistance and an external side insulation resistance ofa relay according to an embodiment of the present disclosure;

FIG. 3 is a schematically structural diagram of a circuit for obtaininginsulation resistance values according to an embodiment of the presentdisclosure;

FIG. 4 is an equivalent schematic diagram of the circuit shown in FIG.3;

FIG. 5 is a schematic flowchart of an implementation of Step S203 in themethod shown in FIG. 2;

FIG. 6 is another equivalent schematic diagram of the circuit shown inFIG. 3;

FIG. 7 is an equivalent schematic diagram of the circuit shown in FIG.6;

FIG. 8 is a schematic flowchart of an implementation of Step S205 in themethod shown in FIG. 2;

FIG. 9 is a schematically structural diagram of a device for obtainingan internal side insulation resistance and an external side insulationresistance of a relay according to an embodiment of the presentdisclosure;

FIG. 10 is a schematically structural diagram of a processor accordingto an embodiment of the present disclosure; and

FIG. 11 is a schematically structural diagram of a battery managementdevice according to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

In order to better understand the technical solutions of the presentdisclosure, the embodiments of the present disclosure are described indetail below with reference to the accompanying drawings.

It should be noted that the embodiments described below are onlyexemplary embodiments of the present disclosure, rather than all of theembodiments. Any other embodiment obtained by those skilled in the arton the basis of the described embodiments without creative efforts shallfall into the protection scope of the present disclosure.

Terms used in the embodiments of the present disclosure are merely forthe purpose of describing particular embodiments, but not intended tolimit the present disclosure. The singular forms “a,” “an,” and “the”used in the embodiments of the disclosure and the appended claims arealso intended to include the plural forms thereof, unless the contextclearly dictates otherwise.

It should be understood that the expression “and/or” used herein merelydescribes an associating relationship of the related objects, revealingthree relationships, i.e., only A, both A and B, and only B. Inaddition, the character “I” in the context generally means an “or”relationship of the related objects.

It should be understood that the terms “first”, “second”, “third”, etc.used to describe thresholds and the like in embodiments of the presentdisclosure are merely aimed to distinguish the thresholds from eachother, but not intended to limit the thresholds. For example, withoutdeparting from the scope of embodiments of the present disclosure, thefirst alarm threshold may also be referred to as a second alarmthreshold, and similarly, the second alarm threshold may also bereferred to as a first alarm threshold.

Based on the context, the word “if” used herein may be interpreted as“when”, “in response to a determination” or “in response to detection.”Similarly, the phrase “if it is determined that . . . ” or “if it isdetected that (the stated condition or event)” may be interpreted as“when it is determined that . . . ” or “in response to a determination”or “when (the stated condition or event) is detected” or “in response tothe detection of (the stated condition or event)”.

In order to solve the problem in the prior art that the external sideinsulation condition of a main relay cannot be obtained if the mainrelay is switched off, and to lower the accompanying safety risk,embodiments of the present disclosure provide the following solution: byusing a method of inputting low-frequency AC signal, a low-frequency ACsignal is input to the main positive relay from a side of the mainpositive relay close to the battery pack; then, an internal sideinsulation resistance of the main relay, i.e., the insulation resistanceof the main relay at the side of the main positive relay close to thebattery pack, is obtained when the main relay and a pre-charge relay areswitched off; when it is determined that the internal side insulationresistance is normal, an external side insulation resistance value ofthe pre-charge relay, i.e., an insulation resistance of the pre-chargerelay at a side of the pre-charge relay away from the battery pack, isobtained as an insulation resistance of the main relay by connecting thepre-charge relay.

Under this concept, the present disclosure provided the followingfeasible embodiments.

According to an embodiment of the present disclosure, a method forobtaining internal side and external side insulation resistance valuesof a relay can be applied to a circuit 100 shown in FIG. 1, the circuit100 including a battery pack 110, a main relay 120 and a pre-chargecircuit 140. The main relay 120 includes a main positive relay 121 and amain negative relay 122. The pre-charge circuit 140 includes apre-charge relay 141 and a pre-charge resistor 142, and isparallel-connected to both sides of the main positive relay 121. Aninsulation resistance obtaining circuit is connected between the batterypack 110 and the main positive relay 121.

As shown in FIG. 1, a positive electrode (+) of the battery pack 110 isconnected to the main positive relay 121, a negative pole (−) of thebattery pack 110 is connected to the main negative relay 122, and a load160 is connected between the main positive relay 121 and the mainnegative relay 122.

Specifically, as shown in FIG. 2, the method for obtaining the internalside and external side insulation resistances of the relay is applied tothe circuit shown in FIG. 1, and can include the following steps:

S201, controlling the insulation resistance obtaining circuit to outputa low-frequency AC signal.

S202, when both the main relay and the pre-charge relay are switchedoff, obtaining an internal side insulation resistance of the main relayaccording to the low-frequency AC signal.

When the main relay is switched off, it means that both the mainpositive relay and the main negative relay are switched off.

This method can be applied to a test before power-on. At this moment,the main positive relay, the main negative relay and the pre-chargerelay are all in a switch-off state. Therefore, the S201 and S202 stepscan be performed one after the other directly after power-on.

Alternatively, this method can be applied to a test after power-on.Considering that the relay may be in a switch-on state, it is alsopossible to control the main positive relay, the main negative relay andthe pre-charge relay to be switched off firstly before step S202 isperformed, and then to perform step S202.

S203, when the internal side insulation resistance of the main relay isnormal, controlling the pre-charge relay to be switched on.

S204, when the main relay is switched off and the pre-charge relay isswitched on, obtaining the external side insulation resistance value ofthe main relay according to the low-frequency AC signal.

The method shown in FIG. 2 may be implemented in a controller. When thecontroller is powered on, the above-mentioned method for obtaining theinternal side and external side insulation resistances of the relay canbe performed according to the method shown in FIG. 2. Alternatively,when the controller meets a preset startup condition, the method forobtaining the internal side and external side insulation resistances ofthe relay can also be performed according to the method shown in FIG. 2.The startup condition of this method is not specifically limited in theembodiments of the present disclosure.

In an embodiment, the controller can control the main positive relay,the main negative relay and the pre-charge relay to be switched off orswitched on, and can also achieve the control of the insulationresistance obtaining circuit outputting the low-frequency AC signal andcollecting an electrical signal.

In another embodiment, the controller may be a microcontroller unit(MCU) or a control component in a battery management system (BMS), ormay be a control component in other devices or apparatuses, which is notspecifically limited in the embodiments of the present disclosure.

In an embodiment, before performing S203, it is also necessary todetermine whether the obtained internal side insulation resistance ofthe main relay is normal or not. In this case, the following steps arealso included:

-   -   detecting whether the internal side insulation resistance of the        main relay is normal or not;    -   if it is detected that the internal side insulation resistance        of the main relay is normal, performing the step of controlling        the pre-charge relay to be switched on and the subsequent steps;    -   if it is detected that the internal side insulation resistance        of the main relay is abnormal, performing an alarm operation.

The alarm operation can be performed in manners including: at least oneof outputting an alarm signal or outputting an alarm information. Thealarm signal may include but not limited to an audio signal, a flickersignal, a vibration signal, and the like.

An embodiment of the present disclosure provides an feasible way todetect whether the internal side insulation resistance of the main relayis normal or not, including:

detecting whether the internal side insulation resistance of the mainrelay is greater than a first preset alarm threshold;

if the internal side insulation resistance of the main relay is greaterthan the first preset alarm threshold, determining that the internalside insulation resistance of the main relay is normal; and

if the internal side insulation resistance of the main relay is lessthan or equal to the first preset alarm threshold, determining that theinternal side insulation resistance of the main relay is abnormal.

In another embodiment, after step S204 is performed, it is alsonecessary to determine whether the obtained external side insulationresistance of the main relay is normal or not. In this case, thefollowing steps are also included:

-   -   detecting whether the external side insulation resistance of the        main relay is normal or not;    -   if it is detected that the external side insulation resistance        of the main relay is normal, ending the detecting; and    -   if it is detected that the external side insulation resistance        of the main relay is abnormal, performing the alarm operation.

An embodiment of the present disclosure provides an feasible way todetect whether the external side insulation resistance of the main relayis normal, including:

-   -   detecting whether the external side insulation resistance of the        main relay is greater than a second preset alarm threshold;    -   if the external side insulation resistance of the main relay is        greater than the second preset alarm threshold, determining that        the external side insulation resistance of the main relay is        normal; and    -   if the external side insulation resistance of the main relay is        less than or equal to the second preset alarm threshold,        determining that the external side insulation resistance of the        main relay is abnormal.

In an embodiment, the first preset alarm threshold and the secondpresent alarm threshold can be preset according to needs, and the firstpresent alarm threshold and the second preset alarm threshold may beidentical or not identical.

The step of ending the detection may include the following steps:controlling the main negative relay to be switched on, so that the loadis pre-charged; when the pre-charge process ends, controlling thepre-charge relay to be switched off; and controlling the main positiverelay to be switched on.

The principle of obtaining the insulation resistance according to thelow-frequency AC signal in steps S202 and S204 are described below.

In the embodiments of the present disclosure, the insulation resistanceobtaining circuit includes two sampling points. Therefore, the internalside and external side insulation resistances of the main relay can beobtained by collecting electrical signals at the two sampling pointswhen the low-frequency AC signal passes through the two sampling points.

For ease of understanding, the present disclosure provides a specificembodiment of an insulation resistance obtaining circuit 150. Referringto FIG. 3, the insulation resistance obtaining circuit 150 includes: asignal synthesizer 151, wherein a first terminal of the signalsynthesizer 151 is grounded; an isolation capacitor 152 connectedbetween the positive electrode of the battery pack 110 and the mainpositive relay 121; a sampling resistor 153 connected between a secondterminal of the isolation capacitor 152 and a second terminal of thesignal synthesizer 151; a first sampling component 154 connected to afirst terminal of the sampling resistor 153; and a second samplingcomponent 155 connected to a second terminal of the sampling resistor153.

The signal synthesizer 151 may be a direct digital synthesizer (DDS) foroutputting a low-frequency signal. In a specific embodiment, theprocessor controls when the signal synthesizer 151 outputs alow-frequency signal.

In a specific embodiment, the structure of the first sampling component154 is shown in FIG. 3. As shown in FIG. 3, the first sampling component154 includes: a first filter resistor 1541, wherein a first terminal ofthe first filter resistor 1541 is connected to the first terminal of thesampling resistor 153; a first filter capacitor 1542, wherein a firstterminal of the first filter capacitor 1542 is connected to a secondterminal of the first filter resistor 1541, and a second terminal of thefirst filter capacitor 1542 is grounded; a first voltage follower 1543,wherein a first input terminal of the first voltage follower 1543 isconnected to both the first terminal of the first filter capacitor 1542and the second terminal of the first filter resistor 1541, and a secondinput terminal of the first voltage follower 1543 is connected to anoutput terminal of the first voltage follower 1543; and a firstanalog-to-digital converter 1544 connected to the output terminal of thefirst voltage follower 1543.

The first filter resistor 1541 and the first filter capacitor 1542together form a filter circuit for filtering the collected electricalsignals, so as to improve the sampling accuracy to a certain extent andfurther improve accuracy of an obtained insulation impedance of an ACmotor.

During collecting of the electrical signal by the first samplingcomponent 154, the first filter resistor 1541 and the first filtercapacitor 1542 in the first sampling component 154 form a first-order RCfilter circuit. Compared with a situation in which the first-order RCfilter circuit is not incorporated, the first sampling component 154 asshown in FIG. 3 will cause phase shift and change in amplitude. When thefirst-order RC circuit is incorporated, equivalent to incorporating aresistor and a capacitor in the circuit, the thus obtained equivalentresistance becomes smaller and the equivalent capacitance becomesgreater, so that phase shift becomes greater. Therefore, in order toreduce the influence of the first-order RC circuit on the accuracy ofthe insulation resistance value, a large first filter resistor 1541 anda small first filter capacitor 1542 can be selected when setting thefirst-order RC circuit, thereby improving the measurement accuracy ofthe insulation resistance value.

In another embodiment, the structure of the second sampling component155 is shown in FIG. 3. As shown in FIG. 3, the second samplingcomponent 155 includes: a second filter resistor 1551, wherein a firstterminal of the second filter resistor 1551 is connected to the secondterminal of the sampling resistor 153; a second filter capacitor 1552,wherein a first terminal of the second filter capacitor 1552 isconnected to a second terminal of the second filter resistor 1551, and asecond terminal of the second filter capacitor 1552 is grounded; asecond voltage follower 1553, wherein a first input terminal of thesecond voltage follower 1553 is connected to both the first terminal ofthe second filter capacitor 1552 and the second terminal of the secondfilter resistor 1551, and a second input terminal of the second voltagefollower 1553 is connected to an output terminal of the second voltagefollower 1553; and a second analog-to-digital converter 1554 connectedto the output terminal of the second voltage follower 1553.

To sum up, based on FIG. 3, when the low-frequency AC signal is asinusoidal signal, the electrical signal U1 collected at the firstsampling component 154 and the electrical signal U2 collected at thefirst sampling component 154 can be expressed as:

U1=U*sin(wt)+M

U2=u*sin(wt+θ)+M

wherein U1 is an electrical signal collected by the first terminal ofthe sampling resistor 153, i.e., a sinusoidal signal generated by thesignal synthesizer 151, U is an amplitude of the sinusoidal signal U1generated by the signal synthesizer 151, w is an angular frequency of asinusoid of the respective sinusoidal signal, and M is a bias voltage ofthe sinusoid; and U2 is an electrical signal collected by the secondterminal of the sampling resistor 153, θ is a phase shift of U2 relativeto U1, and u is an amplitude of U2.

Since U2 and U1 are sinusoidal signals with the same frequency, theangular frequencies of U2 and U1 are the same.

Based on this, during obtaining of the internal side and external sideinsulation resistances of the main relay, the phase shift and theamplitude of the low-frequency AC signal between the two sampling pointscan be determined according to the collected electric signal. Therefore,based on the Kirchhoff s law, the parallel resistance of impedances toground in the current connection manner can be obtained as theinsulation resistance of the relay.

Based on the insulation resistance obtaining circuit 150 as shown inFIG. 3, when the main positive relay 121 and the main negative relay 122are switched off, there are two situations depending on the switch-on orswitch-off status of the pre-charge relay 141:

A first situation: when the pre-charge relay is switched off, FIG. 4 canbe referred to for an equivalent substitute circuit of the circuit 100.

As shown in FIG. 4, the signal synthesizer 151, the sampling resistor153 and the isolation capacitor 152 are series-connected to one another,and are parallel-connected to an internal side parallel equivalentimpedance R_(np) and an internal side parallel equivalent capacitanceC_(np).

R_(np) is a parallel resistance of an equivalent impedance R_(P) of thepositive electrode of the battery pack to the ground and an equivalentimpedance R_(N) of the negative electrode of the battery pack to theground. C_(np) is a parallel capacitance of an equivalent capacitanceC_(P) of the positive electrode of the battery pack to the ground and anequivalent capacitance C_(N) of the negative electrode of the batterypack to the ground.

Due to the characteristics of the parallel connection, the internal sideparallel equivalent impedance R_(np) is smaller than the impedance R_(P)of the positive electrode to the ground and is smaller than theequivalent impedance R_(N) of the negative electrode of the battery packto the ground. Therefore, the internal side parallel equivalentimpedance R_(np) can be obtained as the internal side insulationresistance of the main positive relay to determine the insulationsituation at the side of the main positive relay close to the batterypack.

In this case, referring to FIG. 5, the step S203 may include followingsteps:

-   -   S2031: when both the main relay and the pre-charge relay are        switched off, collecting electrical signals at the two sampling        points by the insulation resistance obtaining circuit.    -   S2032: obtaining a first phase shift of the low-frequency AC        signal between the two sampling points according to the        collected electrical signals.    -   S2033: obtaining the internal side insulation resistance of the        main relay according to the collected electrical signals and the        first phase shift.

Specifically, the internal side insulation resistance R_(np) of the mainrelay, i.e., insulation resistance of the main relay at a side of themain relay close to the battery pack, can be expressed as the followingformula:

${R_{np} = {\frac{\left( {{U*{\cos (\theta)}} - u} \right)*u*R\; 1}{U^{2} - {2*U*u*\cos \; (\theta)} + u^{2}}*\left\lbrack {\frac{\begin{pmatrix}{{w*C\; 1*U*u*R\; 1*{\sin (\theta)}} +} \\\begin{matrix}{U^{\; 2} + u^{\; 2} - {2*U^{\; 2}} +} \\{u^{\; 2} - {2*U*u*{\cos (\theta)}}}\end{matrix}\end{pmatrix}^{2\;}}{w^{2}*C\; 1^{2}*u^{2}*R\; 1^{2}*\left( {{U*{\cos (\theta)}} - u} \right)^{2}} + 1} \right\rbrack}},$

wherein R_(np) is the internal side insulation resistance of the mainrelay, U1 is an electrical signal collected by the first terminal of thesampling resistor 153, i.e., the sinusoidal signal generated by thesignal synthesizer 151, U is the amplitude of the sinusoidal signal U1generated by the signal synthesizer 151, w is an angular frequency of asinusoid of the sinusoidal signal U1, and M is a bias voltage of thesinusoid, U2 is an electrical signal collected by the second terminal ofthe sampling resistor 153, θ is a phase shift of U2 relative to U1, andu is an amplitude of U2.

It should be noted that, the U1 and U2 in the present case are collectedwhen the main positive relay, the main negative relay and the pre-chargerelay are all switched off.

A second situation: when the pre-charge relay is switched on, FIG. 6 canbe referred to for an equivalent substitute circuit of the circuit 100.

As shown in FIG. 6, the signal synthesizer 151, the sampling resistor153 and the isolation capacitor 152 are connected in series, and theseries-connected signal synthesizer 151, sampling resistor 153 andisolation capacitor 152, the internal side parallel equivalent impedanceR_(np), and the internal side parallel equivalent capacitance C_(np) areconnected in parallel to the first terminal of the pre-charge resistor142. An external side parallel equivalent impedance R_(np1), an externalside parallel equivalent capacitance C_(np1), and a load equivalentcapacitance C_(X) are connected in parallel to a second terminal of thepre-charge resistor 142. A relay external side positive equivalentresistance R_(n1) and a relay internal side positive equivalentcapacitance C_(n1) are connected in parallel to the other terminal ofthe load equivalent capacitance C_(X).

Since the load equivalent capacitance C_(X) is quite great with respectto the relay external side positive equivalent resistance R_(n1) and therelay external side positive equivalent capacitance C_(n1), FIG. 6 canalso be equivalently substituted by FIG. 7.

As shown in FIG. 7, the signal synthesizer 151, the sampling resistor153, and the isolation capacitor 152 are connected in series, and theseries-connected signal synthesizer 151, sampling resistor 153 andisolation capacitor 152, the internal side parallel equivalent impedanceR_(np), the internal side parallel equivalent capacitance C_(np), theexternal side parallel equivalent impedance R_(np1), and the externalside parallel equivalent capacitance C_(np1) are connected in parallel.

In this case, the circuit 100 shown in FIG. 7 and the circuit 100 shownin FIG. 4 are constituted based on the parallel connection of theinternal side parallel equivalent impedance R_(np), the internal sideparallel equivalent capacitance C_(np), the external side parallelequivalent impedance R_(np1), and the external side parallel equivalentcapacitance C_(np1), so that the step S205 can be performed in a mannersimilar to that of S203 shown in FIG. 5.

In this case, referring to FIG. 8, the step S205 can perform in thefollowing manner:

-   -   S2051: when the main relay is switched off and the pre-charge        relay is switched on, collecting electrical signals at the two        sampling points by the insulation resistance obtaining circuit;    -   S2052: obtaining a second phase shift of the low-frequency AC        signal between the two sampling points according to the        collected electrical signals;    -   S2053: obtaining the external side insulation resistance of the        main relay according to the collected electrical signals and the        second phase shift.

When the low-frequency AC signal is still in a sinusoid form, theexternal side insulation resistance R_(np) of the main relay can beexpressed as follows:

${R_{{np}\; 1} = {\frac{\left( {{U*{\cos (\theta)}} - u} \right)*u*R\; 1}{U^{2} - {2*U*u*{\cos (\theta)}} + u^{2\;}}*\left\lbrack {\frac{\begin{pmatrix}{{w*C\; 1*U*u*R\; 1*{\sin (\theta)}} +} \\{U^{2} + u^{2} - {2*U*u*{\cos (\theta)}}}\end{pmatrix}^{2}}{w^{2}*C\; 1^{2}*u^{2}*R\; 1^{2}*\left( {{U*{\cos (\theta)}} - u} \right)^{2}} + 1} \right\rbrack}},$

wherein R_(np1) is the external side insulation resistance of the mainrelay, U1 is an electrical signal collected by the first terminal of thesampling resistor 153, i.e., a sinusoidal signal generated by the signalsynthesizer 151, U is an amplitude of the sinusoidal signal U1 generatedby the signal synthesizer 151, w is an angular frequency of a sinusoidof the sinusoidal signal U1, and M is the bias voltage of the sinusoid;and U2 is an electrical signal collected by the second terminal of thesampling resistor 153, θ is a phase shift of U2 relative to U1, and u isan amplitude of U2.

It should be noted that, the U1 and U2 in the present case are collectedwhen the main positive relay and the main negative relay are switchedoff and the pre-charge relay is switched on.

The technical solutions in the above embodiments of the presentdisclosure have the following beneficial effects:

In the embodiments of the present disclosure, with respect to thecircuit formed by the battery pack, the main relay and the pre-chargecircuit, a low-frequency AC signal can be output by the insulationresistance obtaining circuit connected between the battery pack and themain positive relay, so as to obtain the internal side insulationresistance of the main relay when the main relay and the pre-chargingrelay are switched off; and when the internal side insulation resistanceof the main relay is determined to be normal, the pre-charge relay iscontrolled to be switched on, and then the low-frequency AC signal isinput into the pre-charge circuit, so as to obtain the external sideinsulation resistance of the pre-charge relay (equivalent to obtainingof the external side insulation resistance of the main relay) based onthe low-frequency AC signal. In this process, the switched-off mainrelay excludes the security risk caused by the switch-on of the mainrelay when an insulation fault occurs to the side of the main relay awayfrom the battery pack. Therefore, the technical solution provided by theembodiment of the present disclosure can obtain the external side andinternal side insulation conditions of the main relay, so as to solvethe problem in the prior art that the insulation condition at the sideof the main relay away from the battery pack cannot be obtained when themain relay is switched off while avoiding the accompanying securityrisk.

Based on the methods for obtaining the internal side and external sideresistances of the relay provided in the above embodiments, anembodiment of the present disclosure further provides a device forperforming the steps and the methods mentioned in the above embodiment.

Firstly, the embodiment of the present disclosure provides a device forobtaining internal side and external side insulation resistances of arelay. Referring to FIG. 9, the device 900 for obtaining the internalside and external side insulation resistances of the relay includes aninsulation resistance obtaining circuit 150 for outputting an AC signaland collecting an electrical signal; and a processor 1000, wherein theprocessor 1000 is configured to: control the insulation resistanceobtaining circuit to output a low-frequency AC signal; obtain theinternal side insulation resistance of the main relay according to thelow-frequency AC signal, when both the main relay and the pre-chargerelay are switched off; control the pre-charge relay to be switched onwhen the internal side insulation resistance of the main relay isnormal; and obtain the external side insulation resistance of the mainrelay according to the low-frequency AC signal when the main relay isswitched off and the pre-charge relay is switched on.

In addition, an embodiment of the present disclosure further provides aprocessor. Referring to FIG. 10, the processor 1000 includes: a firstcontrol unit 1010 for controlling the insulation resistance obtainingcircuit to output a low-frequency AC signal; a first obtaining unit 1020for obtaining the internal side insulation resistance of the main relayaccording to the low-frequency AC signal, when both the main relay andthe pre-charge relay are switched off; a second control unit 1030 forcontrolling the pre-charge relay to be switched on when the internalside insulation resistance of the main relay is normal; and a secondobtaining unit 1040 for obtaining the external side insulationresistance of the main relay according to the low-frequency AC signal,when the main relay is switched off and the pre-charge relay is switchedon.

In addition, an embodiment of the present disclosure also provides abattery management system. Referring to FIG. 11, the battery managementsystem 1100 includes the device 900 for obtaining the internal side andexternal side insulation resistances of the relay.

At last, an embodiment of the present disclosure provides acomputer-readable storage medium, including: computer-executableinstructions. The computer-executable instructions are executed toimplement the method for obtaining the internals side and external sideinsulation resistances of the relay according to any one of theabove-described embodiments.

Since the units in the embodiment can perform the methods described inthe above embodiments, the related description in the above methodembodiments can be referred for the part that is not described in detailherein.

The technical solutions in the device embodiments of the presentdisclosure have the following beneficial effects:

In the embodiments of the present disclosure, with respect to thecircuit formed by the battery pack, the main relay and the pre-chargecircuit, a low-frequency AC signal can be output by the insulationresistance obtaining circuit connected between the battery pack and themain positive relay, so as to obtain the internal side insulationresistance of the main relay when the main relay and the pre-chargingrelay are switched off; and when the internal side insulation resistanceof the main relay is determined to be normal, the pre-charge relay iscontrolled to be switched on, and then the low-frequency AC signal isinput into the pre-charge circuit, so as to obtain the external sideinsulation resistance of the pre-charge relay (i.e. equivalent toobtaining of the external side insulation resistance of the main relay)based on the low-frequency AC signal. In this process, the switched-offmain relay excludes the security risk caused by the switch-on of themain relay when an insulation fault occurs to the side of the main relayaway from the battery pack. Therefore, the technical solution providedby the embodiments of the present disclosure can obtain the internalside and external side insulation conditions of the main relay, so as tosolve the problem in the prior art that the insulation condition at theside of the main relay away from the battery pack cannot be obtainedwhen the main relay is switched off while avoiding the accompanyingsecurity risk.

Those skilled in the art can clearly understand that, for theconvenience and simplicity of description, the specific working processof the above-mentioned system, device, and units can be known byreferring to the corresponding steps in the described embodiments of themethods, which are not described in detail herein.

It should be understood that, the system, device, and method disclosedin the embodiments provided by the present disclosure may be embodied inother manners. For example, the embodiments of the device describedabove are merely exemplary. For example, the units are merely dividedaccording to logical function and may be divided in other manners inpractical implementations. For example, multiple units or components maybe combined or integrated into another system, or some of the featurescan be omitted or not embodied. In addition, mutual coupling, directcoupling or communication connection shown or discussed above may beindirect coupling or communication connection through interfaces,devices or units, and may be electrical, mechanical or in other forms.

The units described as separate components may be or may not bephysically separated. The components described as units may be or maynot be physical units, that is, may be located in one place or may alsobe distributed to multiple network units. Some or all of the units maybe selected according to actual needs to achieve the objects of thesolution in the embodiment.

In addition, the functional units in the embodiments of the presentdisclosure may be integrated in one processing unit, or may beseparately and physically present, or two or more units may beintegrated in one unit. The above-mentioned integrated unit can beembodied in a form of hardware or in a form of hardware-softwarefunctional unit.

The integrated units embodied in the form of software function unit maybe stored in a computer-readable storage medium. The software functionunit is stored in a storage medium and includes several instructions forcausing a computer device (for example, a personal computer, a server, anetwork device, or the like) or a processor to execute some steps of themethod according to each embodiment of the present disclosure. Theabove-mentioned storage medium includes various media capable of storingprogram code, such as USB flash disk, mobile hard disk, Read-Only Memory(ROM), Random Access Memory (RAM), magnetic disk, compact disc, and thelike.

The foregoing merely describes preferable embodiments of the presentdisclosure, but is not intended to limit the present disclosure. Anymodification, equivalent substitution, improvement, and the like madewithin the principles of the present disclosure should be included inthe protection scope of the present disclosure.

What is claimed is:
 1. A method for obtaining internal side and externalside insulation resistances of a relay, wherein the method is applied toa circuit comprising a battery pack, a main relay and a pre-chargecircuit, the main relay comprises a main positive relay and a mainnegative relay, the pre-charge circuit comprises a pre-charge relay anda pre-charge resistor and is connected in parallel to both sides of themain positive relay, an insulation resistance obtaining circuit isconnected between the battery pack and the main positive relay, whereinthe method comprises steps of: controlling the insulation resistanceobtaining circuit to output a low-frequency AC signal; when both themain relay and the pre-charge relay are switched off, obtaining aninternal side insulation resistance of the main relay according to thelow-frequency AC signal; if the internal side insulation resistance ofthe main relay is normal, controlling the pre-charge relay to beswitched on; and when the main relay is switched off and the pre-chargerelay is switched on, obtaining an external side insulation resistanceof the main relay according to the low-frequency AC signal.
 2. Themethod according to claim 1, wherein before the step of controlling thepre-charge relay to be switched on, the method further comprises stepsof: detecting whether the internal side insulation resistance of themain relay is normal or not; if it is detected that the internal sideinsulation resistance of the main relay is normal, performing the stepof controlling the pre-charge relay to be switched on and the subsequentsteps; and if it is detected that the internal side insulationresistance of the main relay is abnormal, performing an alarm operation.3. The method according to claim 2, wherein the step of detectingwhether the internal side insulation resistance of the main relay isnormal or not comprises: detecting whether the internal side insulationresistance of the main relay is greater than a first preset alarmthreshold; if the internal side insulation resistance of the main relayis greater than the first preset alarm threshold, determining that theinternal side insulation resistance of the main relay is normal; and ifthe internal side insulation resistance of the main relay is smallerthan or equal to the first preset alarm threshold, determining that theinternal side insulation resistance of the main relay is abnormal. 4.The method according to claim 1, further comprising steps of: detectingwhether the external side insulation resistance of the main relay isnormal or not; if it is detected that the external side insulationresistance of the main relay is normal, ending the detecting; and if itis detected that the external side insulation resistance of the mainrelay is abnormal, performing an alarm operation.
 5. The methodaccording to claim 4, wherein the step of detecting whether the externalside insulation resistance of the main relay is normal or not comprises:detecting whether the external side insulation resistance of the mainrelay is greater than a second preset alarm threshold; if the externalside insulation resistance of the main relay is greater than the secondpreset alarm threshold, determining that the external side insulationresistance of the main relay is normal; and if the external sideinsulation resistance of the main relay is smaller than or equal to thesecond preset alarm threshold, determining that the external sideinsulation resistance of the main relay is abnormal.
 6. The methodaccording to claim 4, wherein the step of ending the detecting comprisessteps of: controlling the main negative relay to be switched on, so asto pre-charge a load; when the pre-charging of the load ends,controlling the pre-charge relay to be switched off; and controlling themain positive relay to be switched on.
 7. The method according to claim1, wherein the insulation resistance obtaining circuit comprises twosampling points.
 8. The method according to claim 7, wherein the step ofobtaining the internal side insulation resistance of the main relayaccording to the low-frequency AC signal comprises: when both the mainrelay and the pre-charge relay are switched off, collecting electricalsignals at the two sampling points by the insulation resistanceobtaining circuit; obtaining a first phase shift of the low-frequency ACsignal between the two sampling points according to the collectedelectrical signals and obtaining a change in amplitude of the electricalsignals collected at the two sampling points; and obtaining the internalside insulation resistance of the main relay according to the collectedelectrical signals and the first phase shift.
 9. The method according toclaim 7, wherein the step of obtaining the external side insulationresistance of the main relay according to the low-frequency AC signalcomprises: when the main relay is switched off and the pre-charge relayis switched on, collecting electrical signals at the two sampling pointsby the insulation resistance obtaining circuit; obtaining a second phaseshift of the low-frequency AC signal between the two sampling pointsaccording to the collected electrical signals; and obtaining theexternal side insulation resistance of the main relay according to thecollected electrical signals and the second phase shift.
 10. The methodaccording to claim 1, wherein the insulation resistance obtainingcircuit comprises: a signal synthesizer having a first terminalgrounded; an isolation capacitor connected between a positive electrodeof the battery pack and the main positive relay; a sampling resistorconnected between a second terminal of the isolation capacitor and asecond terminal of the signal synthesizer; a first sampling componentconnected to a first terminal of the sampling resistor; and a secondsampling component connected to a second terminal of the samplingresistor.
 11. The method according to claim 7, wherein the insulationresistance obtaining circuit comprises: a signal synthesizer having afirst terminal grounded; an isolation capacitor connected between apositive electrode of the battery pack and the main positive relay; asampling resistor connected between a second terminal of the isolationcapacitor and a second terminal of the signal synthesizer; a firstsampling component connected to a first terminal of the samplingresistor; and a second sampling component connected to a second terminalof the sampling resistor.
 12. The method according to claim 10, whereinthe first sampling component comprises: a first filter resistor having afirst terminal connected to the first terminal of the sampling resistor;a first filter capacitor having a first terminal connected to a secondterminal of the first filter resistor and a second terminal grounded; afirst voltage follower having a first input terminal connected to boththe first terminal of the first filter capacitor and the second terminalof the first filter resistor, and a second input terminal connected toan output terminal of the first voltage follower; and a firstanalog-to-digital converter connected to the output terminal of thefirst voltage follower.
 13. The method according to claim 10, whereinthe second sampling component comprises: a second filter resistor havinga first terminal connected to the second terminal of the samplingresistor; a second filter capacitor having a first terminal connected toa second terminal of the second filter resistor, and a second terminalgrounded; a second voltage follower having a first input terminalconnected to both the first terminal of the second filter capacitor andthe second terminal of the second filter resistor, and a second inputterminal connected to an output terminal of the second voltage follower;and a second analog-to-digital converter connected to the outputterminal of the second voltage follower.
 14. A device for obtaininginternal side and external side insulation resistances of a relay,comprising an insulation resistance obtaining circuit for outputting anAC signal and collecting an electrical signal, and a processor, whereinthe processor is configured to: control the insulation resistanceobtaining circuit to output a low-frequency AC signal; obtain aninternal side insulation resistance of a main relay according to thelow-frequency AC signal when both the main relay and a pre-charge relayare switched off; control the pre-charge relay to be switched on whenthe internal side insulation resistance of the main relay is normal; andobtain an external side insulation resistance of the main relayaccording to the low-frequency AC signal when the main relay is switchedoff and the pre-charge relay is switched on.
 15. A battery managementsystem comprising the device for obtaining the internal side andexternal side insulation resistances of a relay according to claim 14.